class CreateCategories < ActiveRecord::Migration
  def self.up
    create_table :categories do |t|
      t.string :name

      t.timestamps
    end

    Category.create(:upcategory_id => 1, :name => "produits phyto")
    Category.create(:upcategory_id => 1, :name => "engrais")
    Category.create(:upcategory_id => 2, :name => "fongicide")
    Category.create(:upcategory_id => 2, :name => "herbicide")
    Category.create(:upcategory_id => 2, :name => "glyphosate")
    
  end

  def self.down
    drop_table :categories
  end
end
